import {
  request
} from '../helpers.js';

let debug = process.env.NODE_ENV != 'product';

// 获取商品数据
export const getgoodsTable = function(params) {
    return request({
      url: '/goods',
      params: params
    })
  }
  // 商品删除
export const delGoodsInfo = function(id) {
  return request({
    url: '/goods/' + id,
    method: 'delete'
  })
}

// 商品编辑
export const update = function(id, data) {
  return request({
    url: '/goods/' + id,
    method: 'put',
    data: data
  });
}

// 商品新增
export const store = function(data) {
  return request({
    url: '/goods',
    method: 'post'
  })
}
